package hsmoto.UIContainer
{
	import hsmoto.supportClass.LayoutBase;
	import hsmoto.supportClass.VerticalLayout;
	/**
	 * 布局方式固定为VerticalLayout的容器 
	 * @author Zhang
	 * 
	 */	
	public class VGroup extends Group
	{
		private var _layout:VerticalLayout;
		private var _gap:int;
		
		public function VGroup(gap:int = 10)
		{
			super();
			this.gap = gap;
		}
		
		override protected function createLayout():LayoutBase
		{
			_layout = new VerticalLayout();
			return _layout;
		}
		
		override public function set layout(value:LayoutBase):void
		{
			throw new Error("VGroup的layout固定为VerticalLayout");
		}
		/**
		 * 布局元素之间的垂直间隔
		 */	
		public function get gap():int
		{
			return _gap;
		}

		public function set gap(value:int):void
		{
			_gap = value;
			_layout.gap = _gap;
		}
		/**
		 *水平方向的对齐方式 
		 */		
		public function set horizontalAlign(value:String):void
		{
			_layout.horizontalAlign = value;
		}
		
		public function get horizontalAlign():String
		{
			return _layout.horizontalAlign;
		}
	}
}